package i2.application.checklist.dao.jpa.impl;

import i2.application.checklist.dao.CheckListDao;
import i2.application.checklist.entities.CheckList;
import i2.application.fmw.dao.jpa.JPADAO;

import javax.persistence.Query;

public class CheckListDaoImpl extends JPADAO<CheckList> implements CheckListDao {

	@Override
	public CheckList findWithCompleteLivraison(int id) {
		CheckList checkList = null;
		Query query = entityManager.createNamedQuery("CheckList.findWithCompleteLivraison"); 
		query.setParameter("id", id);
		checkList = (CheckList) query.getSingleResult();

		logger.debug("findWithCompleteLivraison : {}",checkList); 
		return checkList;
	}

}
